package com.gxa.order.service;

import dto.ResultDTO;
import entity.Member;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("user-service")
public interface UserService {

    /**
     * 根据id查询用户是否存在
     * @param memberId
     * @return
     */
    @PostMapping("user/get/byMemberId")
    ResultDTO findByMemberId(@RequestBody Integer memberId);

    /**
     * 根据用户对象查询数据 返回用户id
     * @param member
     * @return
     */
    @PostMapping("user/get/byMember")
    ResultDTO queryMember(@RequestBody Member member);



    //______________________________________________________________________
    /**
     * 根据用户id查询所有信息，包括角色等
     */
    @PostMapping("user/find/all/byMemberId")
    public ResultDTO findAllById(@RequestParam Integer memberId);

    /**
     * 查询管理员邮箱
     */
    @PostMapping("user/find/email")
    public ResultDTO selectEmail();
}
